<template>
    <el-card>
        <el-alert type="warning" title="快速集成开放文档：http://fizzgate.com/guide/manager/manager_open_document_use.html"></el-alert>    
        <el-form :model="queryParams" ref="queryParams" :inline="true" label-width="120px">
            <el-form-item label="名称：" prop="service">
                <el-input v-model="queryParams.service" placeholder="名称" size="small"></el-input>
            </el-form-item>
             <el-form-item label="描述：" prop="service">
                <el-input v-model="queryParams.service" placeholder="描述" size="small"></el-input>
            </el-form-item>
             <el-form-item >
                <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
                <el-button icon="el-icon-delete" size="small" @click="resetQuery('queryParams')">清空</el-button>
            </el-form-item>
        </el-form>
         <el-row :gutter="10">
            <el-col :span="24">
                <div style="margin-bottom: 10px;padding: 0 10px">
                    <el-button type="primary" icon="el-icon-plus" size="small" @click="handleAdd">新增</el-button>
                </div>
            </el-col>
        </el-row>
        <el-table :data="tableData" size="mini" border style="width: 100%">
             <el-table-column type="index" label="#" width="55"></el-table-column>
             <el-table-column prop="date" label="名称"></el-table-column>
             <el-table-column prop="date" label="描述"></el-table-column>
             <el-table-column prop="date" label="地址"></el-table-column>
             <el-table-column label="操作">
               
            </el-table-column>
        </el-table>
        <el-pagination
                v-show="total>0"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                background
                :current-page="1"
                :page-sizes="[10, 20, 30, 40,50,100]"
                :page-size="10"
                layout="total, sizes, prev, pager, next, jumper"
                class="pagination-container"
                :total="total">
        </el-pagination>
    </el-card>
</template>

<script>
    export default {
        data() {
            return {
                queryParams: {

                },
                total: 0,
                tableData: []
            }
        },
        methods: {
            handleAdd() {
                this.$router.push('/layout/interface/collection/add');
            },
            // 搜索
            handleQuery() {
                this.queryParams.current = 1;
                this.getList();
            },
            // 清空
            resetQuery(formName) {
                this.$refs[formName].resetFields();
                this.getList();
            },
            handleSizeChange(val) {
                this.queryParams.size = val;
                this.getList();
            },
            handleCurrentChange(val) {
                this.queryParams.current = val;
                this.getList();
            },
        }
    }
</script>

<style lang="scss" scoped>

</style>